from pyproj import Proj, transform

# 定义源坐标系（EPSG:4326）和目标坐标系（EPSG:3857）
epsg_4326 = Proj(init='epsg:4326')  # WGS84
epsg_3857 = Proj(init='epsg:3857')  # Web Mercator

# 定义图片的经纬度边界 (WGS84坐标系)
bounding_box = {
    "bottom_left": (73.502355, 3.823583),
    "top_right": (135.095670, 53.563269),
}

# 将边界从EPSG:4326转换到EPSG:3857
bottom_left_x, bottom_left_y = transform(epsg_4326, epsg_3857, bounding_box["bottom_left"][0], bounding_box["bottom_left"][1])
top_right_x, top_right_y = transform(epsg_4326, epsg_3857, bounding_box["top_right"][0], bounding_box["top_right"][1])

# 转换后的图片边界（EPSG:3857坐标系）
image_extent = [bottom_left_x, bottom_left_y, top_right_x, top_right_y]
print(image_extent)